package com.newly.common.base.entity.business.Po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @anthor sbq
 * @date 2021/11/4 10:54
 */
@Data
@Accessors(chain = true)
@TableName(value = "gov_check_record")
public class CheckRecord implements Serializable {
    /**
     * 检测记录id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "id不能为空")
    private Integer id;

    /**
     * 设备id
     */
    @TableField(value = "device_id")
    private String deviceId;

    /**
     * 站点id
     */
    @TableField(value = "site_id")
    private Long siteId;

    /**
     * 车牌号
     */
    @TableField(value = "car_num")
    @NotBlank(message = "车牌号不能为空")
    private String carNum;

    /**
     * 车型
     */
    @TableField(value = "car_type")
    private String carType;

    /**
     * 轴数
     */
    @TableField(value = "axle_num")
    private Integer axleNum;

    /**
     * 总重量
     */
    @TableField(value = "total_weight")
    private Double totalWeight;

    /**
     * 标准重量
     */
    @TableField(value = "std_weight")
    private Double stdWeight;

    /**
     * 超出重量
     */
    @TableField(value = "over_weight")
    private Double overWeight;

    /**
     * 超重率
     */
    @TableField(value = "over_rate")
    private Double overRate;

    /**
     * 资源id
     */
    @TableField(value = "res_id")
    private Long resId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private String createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private String updateTime;

    /**
     * 审核意见
     */
    @TableField(value = "opinion")
    private String opinion;

    /**
     * 是否通过人工审核 1-是  2-否
     */
    @TableField(value = "is_audit")
    private Integer isAudit;

    /**
     * 是否超重 0-没有超重 1-轻度超重 2-较轻超重 3-严重超重
     */
    @TableField(exist = false)
    private Integer isOverWeight = 2;

    /**
     * 站点名称
     */
    @TableField(exist = false)
    private String siteName;

    /**
     * 车辆颜色
     */
    @TableField(exist = false)
    private String color;

    /**
     * 车辆id
     */
    @TableField(exist = false)
    @NotNull(message =  "车辆id不能为空")
    private Long carId;

    /**
     * 标志 0-数据查询 1-实时预警
     */
    @TableField(exist = false)
    private Integer flag;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_SITE_ID = "site_id";

    public static final String COL_CAR_NUM = "car_num";

    public static final String COL_CAR_TYPE = "car_type";

    public static final String COL_AXLE_NUM = "axle_num";

    public static final String COL_TOTAL_WEIGHT = "total_weight";

    public static final String COL_STD_WEIGHT = "std_weight";

    public static final String COL_OVER_WEIGHT = "over_weight";

    public static final String COL_OVER_RATE = "over_rate";

    public static final String COL_RES_ID = "res_id";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_AUDIT = "is_audit";
}